#!/bin/bash

set -ux

# echo '下载kindest镜像'
# docker pull kindest/node:v1.25.11

echo '安装 k8s'
kind create cluster --image kindest/node:v1.25.11 --name my-k8s --config kind-config.yaml

echo '切换上下文'
kubectl cluster-info --context my-k8s

echo '查看服务状态'
kubectl get cs -o wide -A

echo '查看节点状态'
kubectl get no

echo '查看pod,service'
kubectl get pod,svc -o wide -A

# 删除集群
# kind delete cluster --name my-k8s
